package com.cxy.springbootelasticjob.job;

import com.cxy.autoconfig.ElasticSimpleJob;
import com.cxy.springbootelasticjob.service.OrderService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author: huayushu luming
 * @date: 2020-11-06 01:58
 * @desc: 第三方订单抓取
 **/
//@ElasticSimpleJob(
//        jobName = "thirdOrderProduceJob",
//        cron ="0/5 * * * * ?",
//        shardingTotalCount = 1,
//        overwrite = true
//
//)
public class ThirdOrderProduceJob implements SimpleJob {
    @Autowired
    private OrderService orderService;
    @Override
    public void execute(ShardingContext shardingContext) {
        orderService.produceThirdOrder();
    }
}
